package com.yunji.app.message;

import com.yunji.cabinet.business.FeedbackBusiness;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.common.model.dto.MemberFeedbackDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.app.message
 * @Title: GateWayFeedbackController
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-10-30 09:58:18      V1.0        HuaAo       新建类
 */
@RestController
@Api(tags = "移动端-故障模块")
@RequestMapping("/gateway/feedback")
public class GateWayFeedbackController {

    @Resource
    FeedbackBusiness business;

    @ApiOperation("添加故障问题")
    @PostMapping("/addFeedback")
    public Response<?> addFeedback(@Valid @RequestBody MemberFeedbackDTO dto) {
        return ResponseHelper.handle(business.addMemberFeedback(dto), "添加成功");
    }

}